package com.synergy.stockflow.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.synergy.stockflow.entity.SysPermission;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

@Mapper
public interface SysPermissionMapper extends BaseMapper<SysPermission> {

    List<SysPermission> selectTree(@Param("baseParentId") Long baseParentId, @Param("codes") Set<String> codes);

    List<SysPermission> selectByQueryParams(@Param("name") String name, @Param("status") Integer status, @Param("type") String type);

    List<String> selectPermissionCodesByUserId(Long userId);
}